package com.hafu.util;

/**
 * @ClassName StringUtil
 * @Author 邓皓轩
 * @Date 2024/11/1 下午7:13
 **/
public class StringUtil {
    public static boolean isEmpty(String str)
    {
        return str==null||str.trim().length()== 0;
    }

    public static void main(String[] args) {
        //情况1
        String s1 = null;
        //情况2
        String s2 = "";
        System.out.println(s1);
        System.out.println(s2);
        System.out.println(isEmpty(s1));
        System.out.println(isEmpty(s2));

    }
}
